﻿
$(function () {
    window.onbeforeunload = function () { return "您确定要退出本程序？"; };

    window.mainpage.instMainMenus();
    window.mainpage.instFavoMenus();
    window.mainpage.instTimerSpan();
    window.mainpage.bindNavTabsButtonEvent();
    window.mainpage.bindToolbarButtonEvent();
    window.mainpage.bindMainTabsButtonEvent();

    var layout = $("#mainLayout");

    $.util.exec(function () {
        var theme = $.easyui.theme(), themeName = $.cookie("themeName");
        if (themeName && themeName != theme) { window.mainpage.setTheme(themeName, false); }

        layout.removeClass("hidden").layout("resize");

        $("#maskContainer").remove();

        var size = $.util.windowSize();
        //  判断当浏览器窗口宽度小于像素 1280 时，右侧 region-panel 自动收缩
        if (size.width < 1280) { layout.layout("collapse", "east"); }
    });
});